<?php

class Frontpage extends Controller {

        /**
         * Frontpage class constructor
         */
	function Frontpage()
	{
		parent::Controller();

                //Redirect those already logged in
                if($this->session->userdata('username'))
                    redirect(base_url() . 'index.php/home');
	}

        /**
         * Index page method.
         */
	function index()
	{
                $data['content'] = 'frontpage_content';
                $data['form_attributes'] = array('name' => 'loginForm');
		$this->load->view('login_template', $data);
	}

        /**
         * Aboutus page method.
         */
        function aboutus()
        {
                $data['content'] = 'aboutus';
                $data['form_attributes'] = array('name' => 'loginForm');
		$this->load->view('login_template', $data);
        }
}
?>
